﻿using project.B12.Model.Enums;
using software.Common.MVVM;

namespace project.B12.Model.Models
{
    public class NewUser  : ObservableObject
    {
        private string name = string.Empty;//用户名
        private string password = string.Empty;//密码
        private string confirmPassword = string.Empty;//确认密码
        private RoleEnum? roleName = null;//角色
        private string department = string.Empty;//部门
        private ExpirationTimeEnum? expirationTime = null;//过期时间
        private string passwordTips = string.Empty;//新建账户密码提示
        private string confirmPasswordTips = string.Empty;//新建账户确认密码提示
        public string Name
        {
            get { return name; }
            set { name = value; this.RaisePropertyChanged(); }
        }
        public string Password
        {
			get { return password; }
			set { password = value; this.RaisePropertyChanged(); }
        }

        public string ConfirmPassword
        {
            get { return confirmPassword; }
            set { confirmPassword = value; this.RaisePropertyChanged(); }
        }

        public RoleEnum? RoleName
        {
			get { return roleName; }
			set { roleName = value; this.RaisePropertyChanged(); }
		}
        public string Department
        {
            get { return department; }
            set { department = value; this.RaisePropertyChanged(); }
        }
        public ExpirationTimeEnum? ExpirationTime
        {
            get { return expirationTime; }
            set { expirationTime = value; this.RaisePropertyChanged(); }
        }
        public string PasswordTips
        {
            get { return passwordTips; }
            set { passwordTips = value; this.RaisePropertyChanged(); }
        }
        public string ConfirmPasswordTips
        {
            get { return confirmPasswordTips; }
            set { confirmPasswordTips = value; this.RaisePropertyChanged(); }
        }

        /// <summary>
        /// 清空信息
        /// </summary>
        public void ClearInfo()
        {
            Name = string.Empty;//用户名
            Password = string.Empty;//密码
            ConfirmPassword = string.Empty;//确认密码
            RoleName = null;//角色
            Department = string.Empty;//部门
            ExpirationTime = null;//过期时间
        }

        public void ClearTips()
        {
            PasswordTips = string.Empty;
            ConfirmPasswordTips = string.Empty;
        }
    }
}
